/*******************************************************************************
 * Copyright (c) 2006 CEA List.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     CEA List - initial API and implementation
 *******************************************************************************/
package com.cea.papyrus.core.helper;

import java.util.ArrayList;

import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.uml2.uml.Element;

import com.cea.papyrus.diagraminterchange2.di2.Diagram;
import com.cea.papyrus.diagraminterchange2.di2.GraphElement;

/**
 * Inteface for factories that deal with UML Elements. It defines methods
 * for UML elements creation, destruction, add/remove to a parent.
 * It also defines methods for graph node creation/destruction/etc.
 * 
 * @author Remi Schnekenburger
 * TODO: comment this class
 */
public interface IGraphElementHelper extends IUMLElementHelper{
	
	/**
	 * This method sets for a graphElement its BackgroundColor, BorderColor, FontColor,
	 * FontFamily and FontSize.
	 * 
	 * @param graphElement 
	 */
	public void setGraphElementPreferences(GraphElement graphElement);
		
	/**
	 * This method creates a graphNode and an associated umlElement.
	 * 
	 * @param umlChild 
	 * @param size 
	 * @param location 
	 * @param parent 
	 * 
	 * @return the created GrahNode
	 */
	public GraphElement createGraphElement(Element umlChild, GraphElement parent, Point location, Dimension size); 
	
	/**
	 * this method.
	 * 
	 * @param child 
	 * @param parent 
	 * 
	 * @return 
	 */
	public GraphElement addGraphElement(GraphElement child, GraphElement parent);
   
	/**
	 * 
	 * 
	 * @param child 
	 * @param parent 
	 * 
	 * @return 
	 */
	public boolean removeGraphElement(GraphElement child, GraphElement parent);
	
	/**
	 * this method is used to know if an element to a parentGraphNode.
	 * 
	 * @param parent the parent graph node
	 * 
	 * @return true if the element can be created and added to the parent graph node
	 * *
	 */
	public boolean canCreateGraphElement(GraphElement parent);
	
	/**
	 * this method creates a graph node in a given diagram for a given uml Element.
	 * 
	 * @param umlElement this is the uml Element that will have a new graphNode
	 * @param diagram this is diagram that will contain the new graphNode
	 * 
	 * @return list of created graphNodes
	 */
	@Deprecated
	public ArrayList createGraphNode(Element umlElement, Diagram diagram);
	
	
}
